﻿#include <TestDll.h>
#include <iostream>
#include <IUser.h>
#include "DllUser.h" 
#include <functional>

bool TestDllCreate(ParamSetRef pParamSet)
{
	std::cout << "TestDllCreate." << std::endl;

	IUserRef pGetUser = pParamSet->Get<1, IUserRef>();
    if (pGetUser == nullptr)
    {
        return false;
    }

    pGetUser->PrintUser();

	return true;
}

bool TestCreateDllUser(IUserRef pUser)
{
    static CDllUser sDllUser;

    pUser->SetFun(std::bind(&CDllUser::Execute, &sDllUser, std::placeholders::_1));

    return true;
}
